﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WS.EKA.Business.Model;
using Newtonsoft.Json;

namespace WS.EKA.UI.Business.Bussiness
{
    internal class OnDutyFactory : ReportBase<List<OnDuty>>
    {
        public override WebSocketClientType Key
        {
            get
            {
                return WebSocketClientType.ITNotice_OnDuty;
            }
        }

        public override string GetJsonString(object parameter)
        {
            var obj = new
            {
                Data = (parameter as ReportParameter<List<OnDuty>>).Data,
                Day = DateTime.Now.ToString("yyyy年MM月dd日"),
                WeekDay = DateTime.Now.DayOfWeek
            };
            return JsonConvert.SerializeObject(obj);
        }
    }
}
